package com.cragon.cglib;

import org.springframework.cglib.proxy.Callback;
import org.springframework.cglib.proxy.Enhancer;

/**
 * @Description: TODO
 * @Author: ZHOUHAILONG
 * @Date: 2021年03月15日 17:55
 */
public class FactoryProxy {
	public static Object createObject(Class<?> clazz, Callback callback) {
		Enhancer enhancer = new Enhancer();
		enhancer.setSuperclass(clazz);
		enhancer.setCallback(callback);
		return enhancer.create();
	}
}
